package com.gistone.commis.entity;


import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;

/**
 * Created by wangfan on 2017/5/1.
 */
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class User {
	private Integer userId;

	private String userName;

	private String userPwd;

	private String userEmail;

	private String userPhone;

	private String realName;

	private Integer departId;

	private Integer communityId;

	private Integer parentId;

	private User parentUser;

	private Integer userTypeId;
	private  UserType userType;
	private  String image;




	private   Depart depart;

	private   Community community;

	private List<Role> roles;

	public User(Integer userId, String userName, String userPwd, String userEmail, String userPhone, String realName, Integer departId, Integer communityId, Integer parentId, Integer userTypeId,String image) {
		this.userId = userId;
		this.userName = userName;
		this.userPwd = userPwd;
		this.userEmail = userEmail;
		this.userPhone = userPhone;
		this.realName = realName;
		this.departId = departId;
		this.communityId = communityId;
		this.parentId = parentId;
		this.userTypeId = userTypeId;
		this.image=image;
	}

	public User(String userName) {
		this.userName =userName;
	}





	
}
